<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-10-04
 * Time: 15:21
 */

namespace App\Http\Controllers\Validator;
use Validator;

class PositionVail
{

    public static function addPosition($params){
        $return = true;
        $validator = Validator::make($params, [
            'p_name'                       =>        'required',//职务名称
            'p_authories'                  =>        'required',//职务权限
        ]);
        if ($validator->fails()) {
            $return = false;
        }
        return $return;
    }

    public static function editPosition($params){
        $return = true;
        $validator = Validator::make($params, [
            'p_id'                       =>        'required',//职务ID
        ]);
        if ($validator->fails()) {
            $return = false;
        }
        return $return;
    }
}